import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'app_plugin_method_channel.dart';

abstract class AppPluginPlatform extends PlatformInterface {
  /// Constructs a AppPluginPlatform.
  AppPluginPlatform() : super(token: _token);

  static final Object _token = Object();

  static AppPluginPlatform _instance = MethodChannelAppPlugin();

  /// The default instance of [AppPluginPlatform] to use.
  ///
  /// Defaults to [MethodChannelAppPlugin].
  static AppPluginPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [AppPluginPlatform] when
  /// they register themselves.
  static set instance(AppPluginPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<void> startVpn(String configJson) {
    throw UnimplementedError('startVpn() has not been implemented.');
  }

  Future<void> stopVpn() {
    throw UnimplementedError('stopVpn() has not been implemented.');
  }

}
